package com.huobao.yunying.utils;

import com.huobao.zhangying.R;

import android.content.Context;
import android.view.WindowManager.LayoutParams;
import android.widget.PopupWindow;

public class PopWindowUtil {
	private Context c;
	private PopupWindow m_SelectPopupWindow;

	public PopWindowUtil(Context c) {
		this.c = c;
	}

	/**
	 *
	 * @param view
	 */
	public PopupWindow initPopupWindow() {
		m_SelectPopupWindow = new PopupWindow(c);
		m_SelectPopupWindow.setFocusable(true);
		m_SelectPopupWindow.setTouchable(true);
		m_SelectPopupWindow.setOutsideTouchable(true);
		m_SelectPopupWindow.setBackgroundDrawable(c.getResources().getDrawable(R.mipmap.pop_black_alaph_bg));
		m_SelectPopupWindow.setWidth(LayoutParams.MATCH_PARENT);
		m_SelectPopupWindow.setHeight(LayoutParams.WRAP_CONTENT);
		return m_SelectPopupWindow;
		// m_SelectPopupWindow.setHeight(LayoutParams.WRAP_CONTENT);
	}
}
